<?php

namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class ActivityResource extends JsonResource
{
    public function toArray($request)
    {
    	$resource = $this->resource;
    	
        return [
        	'id' => (int)$resource->id,
	        'image' => img_path($resource->image),
            'title' => $resource->title,
            'desc' =>$resource->desc,
            'quantity' =>$resource->quantity,
            'acticity_started_at' => (string)$resource->acticity_started_at,
            'acticity_ended_at' => (string)$resource->acticity_ended_at,
	        'created_at' => (string)$resource->created_at,
        ];
    }
}
